// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.

// This behavior can be attached to a textbox to enable auto-complete/auto-suggest
// scenarios.
Type.registerNamespace('GridControl');
GridControl.ColorPickerExtenderBehavior = function(element) {
   
    GridControl.ColorPickerExtenderBehavior.initializeBase(this, [element]);
      
}
GridControl.ColorPickerExtenderBehavior.prototype = {
    initialize: function() {
    
        GridControl.ColorPickerExtenderBehavior.callBaseMethod(this, 'initialize');
        var id=this.get_element().id;
        var objConfig={};
        objConfig.showHexValue= this._showHexValue;
        var dtField= new Ext.form.ColorField(objConfig);
        dtField.applyTo(id);
       
    },
    
    get_showHexValue: function() {
       
        return this._showHexValue;
    },
    set_showHexValue: function(value) {
        this._showHexValue = value;
    }
    
  
    
}
GridControl.ColorPickerExtenderBehavior.registerClass('GridControl.ColorPickerExtenderBehavior', AjaxControlToolkit.BehaviorBase);